using System.BusinessObjects.Transactions;
using Blazing.BusinessObjects.Assets;
using NHibernate;
using NHibernate.Criterion;

namespace Blazing.BusinessObjects.Queries
{
    public class QryFetchAssetByFullPath
    {
        public static ICriteria Query(string path, string filename)
        {            
            ICriteria qry = UnitOfWork.CurrentSession.CreateCriteria(typeof(Asset));
            qry.Add(Expression.Eq("FilePath", path));
            qry.Add(Expression.Eq("FileName", filename));
            return qry;       
        }
    }
}
